package com.ys.web.api.assistant.controller;

import com.ys.utils.base.http.ResponseHandler;
import com.ys.utils.base.j2se.StringHandler;
import com.ys.utils.spring.properties.Config;
import com.ys.web.api.assistant.service.GroupAssistantService;
import com.ys.web.api.assistant.vo.GroupAssistantVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ 名称:
 * @ 创建人: dhf
 * @ 参数： null
 * @ 创建时间: 2022/5/10
 * @ 修改人和其它信息
 * @ 返回值:
 */
@Slf4j
@RestController
@RequestMapping("/group/api")
public class GroupAssistantController {

    @Autowired
    private GroupAssistantService groupAssistantService;

    @RequestMapping("/thirdparty")
    public String thirdparty(GroupAssistantVO groupAssistantVO) {
        groupAssistantVO.check();
        if(StringHandler.isNotEmpty(groupAssistantVO.data)){
            String keyWord = Config.pp.get("msg.data.key.word.list");
            groupAssistantVO.data = StringHandler.keywordReplace(keyWord,groupAssistantVO.data);
        }
        groupAssistantService.thirdparty(groupAssistantVO);
        return ResponseHandler.success();
    }


}
